from rest_framework import serializers

from area.serializers import AreaSerializer
from school.models import School


class SchoolListSerializer(serializers.ModelSerializer):
    """
    学校序列化类
    """
    area = AreaSerializer()
    class Meta:
        model = School
        fields = "__all__"


class SchoolCreateSerializer(serializers.ModelSerializer):
    """
    学校序列化类
    """
    class Meta:
        model = School
        fields = "__all__"
